package im.vinci.server.songbook.controller;

import im.vinci.server.songbook.domain.PlayList;
import im.vinci.server.songbook.domain.wrapper.GetHeadPhoneSongbookResponse;
import im.vinci.server.songbook.service.SongbookService;
import im.vinci.server.utils.apiresp.ResultObject;
import im.vinci.server.utils.cache.Cache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by mingjie on 16/12/5.
 */
@RestController
@RequestMapping(value = "/vinci/headphone/songbook")
public class SongbookController {

    @Autowired
    private SongbookService songbookService;

    @RequestMapping(method = RequestMethod.GET)
    public ResultObject<GetHeadPhoneSongbookResponse> getHeadPhoneSongbook(@RequestParam("version") int version) {
        return new ResultObject<>(songbookService.getHeadPhoneSongbook(version));
    }
}
